from pymouse import *
from pykeyboard import *
import time

m = PyMouse()
k = PyKeyboard()


def sout():
    print("aaa")


x = int(300 / 2)
y = int(2100 / 2)
m.click(x, y, 1, 1)
print('选中微信')
time.sleep(0.3)

x = int(2000 / 2)
y = int(1300 / 2)
print('进入输入框')

m.click(x, y, 1, 1)


def send():
    k.press_key(17)
    k.press_key('v')
    k.release_key(17)
    k.release_key('v')
    k.tap_key(13, 1, 0.03)
    time.sleep(0.3)


def send_n(n=1):
    for a in range(1, n + 1):
        send()

times = 0

while 1 == 1:
    now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    if now == '2022-02-22 22:22:22'and times == 0:
        times = 1
        send()
    time.sleep(0.09)